//
//  TTDetailModel.m
//  TaoTuo
//
//  Created by admin on 2019/8/24.
//  Copyright © 2019 admin. All rights reserved.
//

#import "TTDetailModel.h"

@implementation TTDetailModel

+ (nullable NSDictionary<NSString *, id> *)modelContainerPropertyGenericClass
{
    return @{
             @"GoodsImageList" : [TTDetailBannerModel class],
//             @"StockList" : [TTDetailStockListModel class],
             @"Share" : @"TTDetailShareModel",
             @"Customized" : @"TTCustomizedModel",
             @"Stock" : @"TTDetailStockListModel",
             };
}

+ (NSDictionary *)modelCustomPropertyMapper {
    return @{
//             @"InsertSizeList"  : @"StockScreen.InsertSizeList",
//             @"HandSizeList"  : @"StockScreen.HandSizeList",
//             @"BraceletSizeList"  : @"StockScreen.BraceletSizeList",
//             @"GoldColorList"  : @"StockScreen.GoldColorList",
//             @"ProductColorList"  : @"StockScreen.ProductColorList",
//             @"FinishedProductList"  : @"StockScreen.FinishedProductList",
//             @"ProductGradeList"  : @"StockScreen.ProductGradeList",
             
             
             @"Colour" : @"DiamondsRecommend.Colour",
             @"Clarity" : @"DiamondsRecommend.Clarity",
             @"Cut" : @"DiamondsRecommend.Cut",
             @"Polish" : @"DiamondsRecommend.Polish",
             @"Sym" : @"DiamondsRecommend.Sym",
             @"Flour" : @"DiamondsRecommend.Flour",
             @"EyeClean" : @"DiamondsRecommend.EyeClean",
             @"Milky" : @"DiamondsRecommend.Milky",
             @"Browness" : @"DiamondsRecommend.Browness",
             @"Cert" : @"DiamondsRecommend.Cert",
             
             };
}


/// 是否是售罄
- (BOOL)isSelloutGoods
{
    return (self.StockNumber.intValue == 0) && (self.CustomizedCount == 0);
}

/// 是否是现货
- (BOOL)isExistingGoods
{
    return self.StockNumber.intValue > 0;
//    return (self.StockNumber.intValue > 0) && (self.CustomizedCount == 0);
}

/// 是否是定制
- (BOOL)isCustomGoods
{
    return self.StockNumber.intValue == 0;
//    return (self.StockNumber.intValue == 0) && (self.CustomizedCount > 0);
}







@end
